home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 4 / Precision Software Applications Silver Collection Volume 4 (1993).iso / stats / chadyn.exe / YINTRPT.DOC < prev    next >
Text File  |  1988-12-15  |  22KB  |  478 lines

  1.                 YINTRPT.DOC
  2.  
  3.     This file is read by the program as follows. The computer scans each 
  4. line looking for lines beginning with a '*'; when it finds one, it compares 
  5. the rest of the line with a string it is looking for; if it matches, it prints 
  6. out the following lines until it hits another line beginning with a star. The 
  7. lines you are now reading are before stars and so cannot be printed out. A 
  8. line consisting of a * followed by a return is a terminator and can be 
  9. followed on the next lines with comments that will not be printed out.
  10.  
  11.     If you should wish to add an interrupt to interrupt() in YINTRPT.C, 
  12. notice that extended ascii characters (including the arrow keys and function 
  13. keys and Alt keys) have been given negative values to distinguish them 
  14. from ascii keys.
  15.  
  16.     The source code in YCASES.C and YINTRPT.C accesses this text using 
  17. the command:
  18.             getText("yintrpt.doc","keys\n");
  19. which gets the material following        *keys     Another similar approach 
  20. is used in YFETCH.C.
  21.  
  22. *A
  23.  Actions menu (*A):            
  24.   p pause                 
  25.   Esc un-pause                 
  26.   : command                 
  27.   *X cross menu             
  28.   *Y Output menu             
  29. *B
  30.   Box menu (*B):               
  31.    b draw box                 
  32.    t draw box with tic marks         
  33.    T fine Tic marks              
  34.    *T selecT box                
  35. *H
  36.  Help level menu (*H):             
  37.   0 no text                  
  38.   1 minimal text                
  39.   2 substantial text (ideal)         
  40.   3 lots of text (default)        
  41.   q map and parameters and speed      
  42.   ? quick list of interrupts         
  43. *S
  44.  Screen menu (*S):               
  45.   c clear                    
  46.   r refresh                  
  47.   *B Box menu                
  48.   *Z Color menu              
  49. *T
  50.     selecT box menu (*T):        
  51.      x,y set lower right hand of box at y1 
  52.      X,Y set upper left hand of box at y1  
  53.      *W Window menu              
  54. *W
  55.     Window menu (*W):              
  56.      s scale new window                
  57.      F1 go to upper left window       
  58.      F2 go to upper right window      
  59.      F3 go to lower left window      
  60.      F4 go to upper right window      
  61.      F10 go to full screen window      
  62.      c clear current window          
  63.      C clear entire screen           
  64. *
  65. *X
  66.   Cross menu (*X):            
  67.    arrow keys move small cross       
  68.    i initialize                
  69.    k big cross along trajectory 
  70.    K permanent cross at y         
  71.    O draw circle & images at y1     
  72.    I increase iterate number        
  73. *Y
  74.   output menu:                 
  75.    4 print one dot on printer         
  76.    5 print all dots on printer         
  77.    P Print screen             
  78. *Z
  79.   Color menu (*Z):            
  80.    F5 decrease color + initialize      
  81.    F6 increase color + initialize      
  82.    F7 decrease color number         
  83.    F8 increase color number         
  84.    F9 set color number             
  85.    Q set shade (VGA only)         
  86.    *Q gives shade settings        
  87. *
  88.  
  89.  
  90. *keys
  91. KEYBOARD INTERRUPTS:  (HIT '*'plus key FOR MORE INFORMATION WHILE PLOTTING)
  92. space bar: exit to MainMenu                     
  93. ':'    for MainMenu command                                +/-: [change rho]
  94. 0,1,2,3:screen output        4:print-y-on-printer          5:print-trajectory 
  95. ARROW KEYS:  turn on + move small cross, the position of y1[]
  96. B)ig box: resets box coordinates to those of whole window  b)ox  (see x..Y) 
  97. c,C:    clear screen 
  98. e)rror[DifEq]                                              E: = e  repeatedly
  99. F1,F2,F3,F4: change Screen window                          F10:  whole screen 
  100. i)nitialize y[] at small cross
  101. I:     increment # images by 1; see *O and *I              k: cross at each y
  102. K:     permanent cross at y[]                              L: ya-yb-yc-yd box
  103. m)ove-yx[]-to-yz[]-where x and z = a...e,or 0,1,...,9  i)nitialize-y[]=y1[]
  104. O:     draw circle, centered at small cross
  105. p)lot dot & pause                                          Esc: un-pause
  106. P)rint-pic                                                 q: parameters,etc
  107. r)efresh screen                                            s)cale changed
  108. t)ic marks   T)icmarks                       u)nscale
  109. w: show coordinates of small cross                         v: invert process  
  110. x,X,y,Y: set box coordinates at small cross:(x,y)=lower left;(X,Y)=up.right 
  111. **
  112.  
  113. KEYBOARD INTERRUPTS: 
  114.           (HIT '*'plus key FOR MORE INFORMATION WHILE PLOTTING)
  115.  
  116. space bar: exit to MainMenu                     
  117. ':'     to be able to enter a menu command without leaving plot
  118. +/-: [change rho]
  119. Esc: un-pause (resume plotting)
  120. F1,F2,F3,F4:  change Screen window (window must be open -- see 's'
  121. F10: change window to be the whole screen
  122. F5,...,F9 select color of future points on screen
  123.  
  124. 0,1,2,3: amount of text going to screen or printer while plotting    
  125. 4:print-y-on-printer  (prints just one point)
  126. 5:print-trajectory (prints all points until a lower number is hit)
  127.  
  128. ARROW KEYS:  turn on + move small cross, the position of y1[]
  129.  
  130. B)ig box: resets box coordinates to those of whole window  
  131. b)ox  (see x..Y) draw box, whole screen unless x,X,y, or Y is set)
  132. c,C:    clear screen   c clears only the current window
  133. e)rror[DifEq]  gets local error for one differential equation step
  134. E: = e  repeatedly, tallies worst local error
  135. i)nitialize y[] at small cross; also resets # images to 0; see I
  136. I: increment # images by 1; see O and L and i   
  137. k: temporary cross drawn at each y; hit again to turn off
  138. K: permanent cross at y[] 
  139. L: draws ya-yb-yc-yd box (or part of it) and its images (see I) 
  140. m)ove-yx[]-to-yz[]-where x and z = a...e,or 0,1,...,9  
  141. O: draw circle, (and I images) centered at small cross (see I)
  142. p)lot dot & pause                               
  143. P)rint -- sets picture to Printer (abort print using Esc )                                
  144. q: parameters,etc
  145. r)efresh screen                                 
  146. s)cale changed -- opens windows or uses whole screen
  147. t)ic marks   
  148. T)icmarks drawn -- extra fine
  149. u)nscale -- undoes last window selection
  150. v: invert process (for Henon or Diferential Equations
  151. w: show coordinates of small cross 
  152. x,X,y,Y: set box coordinates at small cross:
  153.       (x,y)=lower left coordinates of cross ;(X,Y)=uppper right 
  154.  
  155. *
  156.  
  157. *Esc
  158. Hitting 'Esc' stops single stepping mode and turns off big cross; see also *p  
  159. *
  160.     The following line is a * followed by a space ' ' and a return
  161. Hitting the space bar ' ' terminates the graphics and returns to the       
  162. Main Menu.                                    
  163.  
  164. *
  165.     if (kk == DOWN || kk == UP || kk == RIGHT || kk == LEFT 
  166.                || kk == End || kk == PgDn)
  167.  
  168. *DOWN
  169. The arrow keys move the position of the vector y1[] which is marked by the 
  170. small cross; the small cross is turned on if it is off; in single stepping 
  171. mode, y[] is plotted. Initially each move of the small cross is 1/100 of the  
  172. screen width or height, but the size of these moves can be changed: it is 
  173. doubled if you hit the 'End' key and halved by hitting 'PgDn'. Hitting either 
  174. of these two will get the step size printed out.
  175.                                  
  176. *
  177.     if (kk == '+' || kk == '-' ||kk == Home || kk == PgUp ) 
  178. *+
  179. Keys +/- increase/decrease the value of rho currently being used. Rho is a 
  180. common parameter in the maps and differential equations. Use command RS    
  181. from menu to set rho step, that is the ammount it is changed by hitting +. It 
  182. can also be changed while plotting using either the 'PgUp' or 'Home' keys.   
  183. The key 'PgUp' doubles the rho step size used by +/- and 'Home' halves it. +/-
  184. reinitialize dot number and Lyapunov exponents and cause new rho step to be 
  185. printed out.                     
  186.  
  187. *?
  188. Hitting '?' prints a brief description of options allowed while plotting.  
  189. *
  190.     if (( kk >= '0') && ( kk <= '9'
  191. *0
  192. There is a variable "printer" that can be set = 0,1,...,6 by hitting the       
  193. corresponding digit. The ammount of data displayed or printed out is       
  194. determined by this variable, the higher the value, the more data. Setting  
  195. it >= '3' causes lyap exponents and ordinary differential equation error   
  196. data to be printed out as it is computed. Setting '4' causes a point data  
  197. to be printed (ON THE PRINTER) on first call of iterate_map() which then   
  198. resets printer to 2. Setting = 5 causes position vector to be printed on   
  199. printer EVERY TIME a point is ITERATED which can be more frequent than     
  200. plotting. Optimal values are 2 and 3 (=default). 3 is often excessive and  
  201. prints so much that the program is slowed.                     
  202. *
  203. *b
  204. Hitting 'b' causes a box to be drawn. The default position of the box is    
  205. the entire screen (or quadrant if you have rescaled to a quadrant). The     
  206. positions of the sides of the box are set by first moving the small cross to 
  207. lie along one of the sides or corners of the box and then hitting x,X,y, or Y.
  208. x for example denotes the left coordinate of where the box will be drawn.    
  209. Hitting x sets the right side of the box equal to the x coordinate         
  210. of the small cross. See also x,y,X,Y, or s. Box coordinates are printed    
  211. if 'printer' > 1; see '*1'. The region inside the box can be rescaled to be  
  212. the entire screen or to be a coordinate using 's'.                 
  213.     Hitting  'B' resets the box coordinates to be the edge of the entire 
  214. screen (or quadrant).                            
  215.  
  216. *c
  217. To  clear  the  entire screen hit 'C';  if you are plotting  in  a 
  218. window  (one of the quadrants of the screen),  hitting 'c'  (lower 
  219. case)  clears  just that quadrant.  If your window is  the  entire 
  220. screen, it also clears that.
  221.  
  222. To  clear  the  entire screen hit 'C';  if you are plotting  in  a 
  223. window  (one of the quadrants of the screen),  hitting 'c'  (lower 
  224. case)  clears  just that quadrant.  If your window is  the  entire 
  225. screen, it also clears that.
  226.  
  227.  
  228. *d 
  229. 'd' turns on double width printing when printing text on the printer. Turn 
  230. your printer off and on to reset it.                         
  231.  
  232. *
  233. *e
  234. 'e' and 'E' are for differential equations; they give estimates of how  big 
  235. the error is in taking a single step.  'e' does this once and 'E' does it 
  236. repeatedly,  about every 5 Runge-Kutta steps.  Hit 'E'  again and it stops. 
  237.           To  carry  out  'e',   the  program  compares  the  last 
  238. differential  equation  step with the result of two steps half  as big  that 
  239. start from the same point.  We can expect the two  small steps  to  be  about 
  240. 16 times as accurate as  the  big  step.  The reported  error  is simply the 
  241. distance between the  two  results. This  is just the single step (local) 
  242. error,  not  the  cumulative error which gets arbitrarily large exponentially 
  243. fast in a chaotic system.  The  ratio  of that error to the actual size of 
  244. the  step (Euclidean norm) is also given. Typing
  245.                 eeeeeeee    (or just holding the key down)
  246. will  give the error for a series of points.  The maximum of these individual 
  247. errors is also kept track. You may note a missing point in  the trajectory,  
  248. since such evaluated points  aren't  printed. This way you can tell which 
  249. step you tested. 
  250.           E   is  a  toggle  so  typing it  again  will  stop  the 
  251. error_check.  The  worst error is recorded and is printed  on  the Main Menu 
  252. screen. 
  253.  
  254. *
  255. *i
  256. 'i' reinitializes the trajectory vector y to be the current position of y1;   
  257. the latter's position is shown by the small cross. (It may be necessary to hit
  258. the Esc key to make the small cross appear. The new x and y of the trajectory
  259. coordinates are printed on the screen. The dot number is set to 0 and      
  260. Lyapunov exponents are reinitialized if they are being computed. It also sets 
  261. the variable "images" to zero; see interrupt 'I'.  Moving the trajectory y  
  262. (=y0) to y1 can also be accomplished with the move interrupt: 'm01'.
  263. *
  264. *I
  265. 'I' causes the variable "images" to be increased by 1 (whereas hitting 'i' 
  266. sets it back to 0); hitting any arrow key moves the small cross and if 
  267. "images" is positive, the trajectory is initiallized at the position of the 
  268. small cross and then the trajectory is automatically iterated "images" times, 
  269. and each of the resulting points is plotted. Moving the arrow keys in this 
  270. fashion is best done in one-step mode, that is after 'o' has been hit (since 
  271. otherwise the trajectory will continue to be iterated). This 
  272. procedure can be terminated and the arrow keys returned to their normal mode 
  273. by  hitting  'i';  "images"  can also be changed  using  the  COMMAND: 
  274. images.
  275.     'I' and 'i' are also useful with the commands CIRCLE and RCIRCLE, 
  276. which causes the drawing of a circle and possibly (if images > 0) some images 
  277. of the circle.
  278.  
  279. *k
  280. Hitting 'k' turns on a feature so that a cross is plotted as each dot is 
  281. plotted; the cross is erased when it is time to plot a new dot. Hitting 'k' 
  282. again turns off this feature.
  283.  
  284. *K
  285. 'K' turns on a cross at the position of y[]. It stays on when y[] moves away; 
  286. holding 'K' down (when not in one step mode) causes a cross to be drawn at a 
  287. series of iterates of y[] (each position of y[] if your keyboard sends 
  288. keystokes to your computer fast enough); there is a slight difference in the 
  289. ways of handling screen and crt, so you should hit 'r' (refresh) to see the 
  290. crt version.                                                               
  291. *
  292.  
  293. *L
  294.           Set  ya,   yb,   yc,   and yd at corners of a quadrilateral; 
  295. this   is  done  by  moving y1,   the little cross  to   the   desired 
  296. position and using the triple interrupt
  297.                     m a 1
  298. That   sets ya equal to y1;   then move y1 to a new   position,   etc. 
  299. Then  command  the "box" or interrupt 'l' (lower case L)  causes   the 
  300. quadrilateral  to be drawn,  and if command "images" or  interrupt 'I' 
  301. has been used to set the number of images to be > 0,   the that number 
  302. of images will then be drawn.  The image will be curvilinear generally 
  303. and the curves are computed accurately even when parts of the images 
  304. are greatly stretched.
  305.           On  the other hand if only ya and yb or ya,yb,  and  yc are  
  306. set (and the rest have the -9999.  default values), then that line  or 
  307. pair of lines and the specified number of images will  be drawn. The 
  308. arc yc to ya will not be drawn.
  309.  
  310.                                     
  311.  
  312. *m
  313. 'm' is for moving a vector to equal another vector; you will be asked first
  314. for the vector to be moved, whose coordinate values will be changed; the 
  315. second  vector tells where you want to move it. The trajectory vector is #0, 
  316. the small cross is #1. Moving y restarts the dot number to 0 and restarts 
  317. the Lyapunov exponents.                            
  318.  
  319.  
  320. *O
  321. The letter O suggests a circle and it results in the drawing of a circle 
  322. centered at y1 (the small cross). Moving the cross via the arrow keys 
  323. immediately shifts the center of the circle. Just that circle is drawn if 
  324. the parameter "images" has value 0, but if it is positive, that number of 
  325. images of the circle will also be drawn. see 'i' and 'I'.                   
  326.     Command  RA  is for changing the radius of this circle.  
  327.     Hitting  O  results in the following comments if 'printer' > 1:
  328. "Hit 'I' to increase the number of images of the circle, 'i' to set it to 0"
  329. "Type #RA to change radius of circle;    use arrow keys to move the center."
  330. "HIT SPACE BAR ONCE ONLY when you now want to terminate circle routine."
  331.  
  332. *p
  333. The key 'p' pauses puts the computer after plotting one dot. Each 
  334. time 'p' is hit, the program computes one more dot for plotting. The large   
  335. cross is positioned at the current location of the trajectory, and as usual   
  336. the small cross is at y1[]. Holding 'p' down will produce a string of 'p'    
  337. commands. 'Esc' returns the program to normal plotting of dots.              
  338.  
  339.  
  340.                                               
  341. *P
  342. Hitting  interrupt 'P' results in a high resolution copy  (a  copy 
  343. that  is  called  the "core copy") of the screen printing  a  high 
  344. resolution  picture  onto  the  printer,  if  you  have  an  Epson 
  345. compatible  printer  or  an  emulator  program.  Printing  can  be 
  346. terminated by hitting Esc. See also main menu command PH.        
  347.  
  348. *q
  349. To print out map parameters and coordinates of small cross, hit 'q'. if    
  350. 'printer' = 0, only the dot number is given. On some computers it will also 
  351. report the number of dots per second. This timer is initialized whenever dot 
  352. is set to 0. The amount printed depends on the variable "printer"; see also 
  353. '*1'.                                         
  354.  
  355. *r
  356. The program keeps a copy of the picture in core that is higher resolution  
  357. than the copy on the screen. That copy is cleaner in that no text is       
  358. written on it. 'r' refreshes the screen, eliminating extraneous text by   
  359. copying from the core memory copy. The refreshed screen copy of course only 
  360. has the resolution of the screen.  The core memory copy is the copy of the 
  361. picture that is used for printing high resolution copies on a printer.     
  362. *
  363.     if (kk == 's' 
  364.      || kk == F1 || kk == F2 || kk == F3 || kk == F4 || kk == F10) 
  365. *s
  366. 's' is for rescaling the screen. First move the small cross and use 'x',
  367. 'y','X' and/or 'Y' to choose new  coordinates for a box. (see 'x'). Hitting x 
  368. for example chooses the lower x coordinate of the box to be the x coordinate 
  369. of the small cross, while Y is for the upper y box coordinate.  Then hit 's'. 
  370. Finally, hitting 'F10' rescales the entire screen to the scale of the box. 
  371. Hitting  'F1','F2','F3', or 'F4' will instead rescale it to occupy one 
  372. quadrant of the screen using the coordinates of the box: upper left, upper 
  373. right,etc.  The small cross is positioned at the center of the sector.    
  374. You can go back and forth between the sections by hitting the appropriate F 
  375. key.  See also 'u'.                                 
  376. *
  377.     if ( kk == F5 || kk == F6 || kk == F7 || kk == F8 || kk == F9)             
  378. *F
  379. The colors on the screen are numbered, 0 to 15 for typical EGA boards 
  380. with color monitors. The program has an active color that is used in all 
  381. plotting (and in refreshing the screen. F8 increases that number while F7 
  382. decreases it. F5 is equivalent to interrupt i followed by F7, while F6 is 
  383. equivalent to i plus F8. You can specify the desired color number by hitting 
  384. F9 followed by an integer and <Enter>.
  385. *t
  386.           Interrupts  't' and 'T' give you two sets of tic  marks. 't' 
  387. also draws the box as 'b' would. Interrupt 'T' and Command   "TIC2"   
  388. both draw an extra fine set of small  tic  marks 
  389. around   where   the  box is or would be if a box  was   drawn   using 
  390. command   "DB" or interrupt 'b'.   It does not draw the   box.   "TIC" 
  391. should  be used if you use "TIC2" so that it is easier  to  figure out 
  392. which values are represented by which tic marks.
  393. *
  394. *T
  395.           Interrupts  't' and 'T' give you two sets of tic  marks. 't' 
  396. also draws the box as 'b' would. Interrupt 'T' and Command   "TIC2"   
  397. both draw an extra fine set of small  tic  marks 
  398. around   where   the  box is or would be if a box  was   drawn   using 
  399. command   "DB" or interrupt 'b'.   It does not draw the   box.   "TIC" 
  400. should  be used if you use "TIC2" so that it is easier  to  figure out 
  401. which values are represented by which tic marks.
  402. *
  403.                                 
  404. *u
  405. If you have rescaled, you can use 'u' to unscale. Hitting 'u' again will   
  406. give you back the rescaled piture, so 'u' is a toggle.             
  407.  
  408. *
  409. *v          
  410.           Command   "v"  and interrupt 'v' invert the Henon  map   and 
  411. invert  differential  equations;  the latter is much simpler than  the 
  412. former;   to   invert a differential equation,   the sign of the  time 
  413. step is made negative.   The inverse of the Henon map is equivalent to  
  414. a  Henon  map with different parameters and scale so  v   changes  the  
  415. parameters  and  scale.   After v,  you are dealing  with  the inverse 
  416. of the system until you invert that,   returning you to the  original.   
  417. These  are  typically  dissipative  systems,   so  the trajectories of 
  418. the  inverse will blow up rapidly.
  419. *
  420.  
  421.  
  422. *w
  423. 'w' causes the position of the small cross to be printed on the lower right of 
  424. the  screen; the values are updated when the small cross is moved; hit it 
  425. again and this feature is turned off.
  426.  
  427.  
  428. ':' colon
  429.  
  430. ':'  allows you to enter ONE main menu command;  To enter another, 
  431. hit ':' again;  for example,  if you are plotting a trajectory and 
  432. you want to change a parameter,  say rho, hit ':'<Enter>RHO<Enter> 
  433. and  the  new  value and <Enter>;  the  program  then  returns  to 
  434. plotting the trajectory with the new rho.  To enter a new command, 
  435. you would have to hit ':' again or return to the menu.  You  could 
  436. also  use ':' to invoke one of the complicated tasks like  calling 
  437. for Newton's Method,  though that routine changes the point y[] of 
  438. the  trajectory,   so  there  are  side  effects.  Other  possible 
  439. combinations  of  complicated commands  may confuse  the  program. 
  440. Calling several successive commands requires the program to keep a 
  441. great   deal  in  memory  simultaneously  and  the  program   will 
  442. eventually fail. This interrupt is also useful for calling menus.
  443. *
  444.     if (kk == 'x' || kk == 'X' || kk == 'y' || kk == 'Y')
  445. *x
  446. 'x' sets left coordinate of the box to the current horizontal coordinate of
  447. the small cross, that is, of y1[]. Similarly 'X' sets the right coordinate,  
  448. 'y' sets the bottom coordinate, and 'Y' the top, all using the small cross.
  449. See 'b' and 's'.                                 
  450.  
  451. *Q
  452. FOR VGA BOARDS AND COLOR SCREENS ONLY. 
  453. Help with COMMAND Q or interrupt Q, enter *Q from the menu.
  454.             UNIVERSAL COLOR VALUES 
  455. number            RED GRN BLUE
  456.   0    BLACK          0   0   0  
  457.   1    BLUE           0   0   2/3  where 2/3 means 42
  458.   2    GREEN          0   2/3 0  
  459.   3    CYAN           0   2/3 2/3 
  460.   4    RED            2/3 0   0   
  461.   5    MAGENTA        2/3 0   2/3
  462.   6    BROWN          2/3 1/3 0    where 1/3 means 21
  463.   7    WHITE          2/3 2/3 2/3
  464.   8    GRAY           1/3 1/3 1/3
  465.   9    LIGHTBLUE      1/3 1/3 max  where max means 63
  466.   10    LIGHTGREEN     1/3 max 1/3
  467.   11    LIGHTCYAN      1/3 max max 
  468.   12    LIGHTRED       max 1/3 1/3 
  469.   13    LIGHTMAGENTA   max 1/3 max 
  470.   14    LIGHTYELLOW    max max 1/3 
  471.   15    BRIGHTWHITE    max max max
  472. *
  473.  
  474.  
  475.  
  476.  
  477.